package thread;

public class GetIdDemo {
    public static void main(String[] args) {
        Thread t = Thread.currentThread();//Thread.currentThread()获取运行该方法的线程
        System.out.println(t);
        String s = t.getName();
        System.out.println(s);
        System.out.println(t.getId());
        System.out.println(t.getPriority());
    }
}
